package org.gd.hellojaxb.privat24.cardlist;

import org.gd.hellojaxb.adapters.SecureCardXmlAdapter;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.UUID;

@XmlRootElement(name = "account")
@XmlAccessorType(XmlAccessType.FIELD)
@SuppressWarnings("unused")
public class SAccount {

    @XmlAttribute(name = "id")
    private String cardId;
    @XmlAttribute(name = "cardtype")
    private String cardType;
    @XmlAttribute(name = "ccy")
    private String ccy;
    @XmlAttribute(name = "accPayAvail")
    private boolean accPayAvail;
    @XmlAttribute(name = "isHiddenForStatements")
    private boolean isHiddenForStatements;
    @XmlJavaTypeAdapter(SecureCardXmlAdapter.class)
    @XmlAttribute(name = "acc")
    private String acc;
    @XmlAttribute(name = "cardstate")
    private String cardState;
    @XmlAttribute(name = "isMulticurrency")
    private boolean isMultiCurrency;
    @XmlAttribute(name = "isHiddenForPays")
    private boolean isHiddenForPays;
    @XmlAttribute(name = "acctype")
    private String accType;
    @XmlAttribute(name = "name")
    private String name;
    @XmlJavaTypeAdapter(SecureCardXmlAdapter.class)
    @XmlAttribute(name = "card")
    private String card;
    @XmlAttribute(name = "expd")
    private String expd;
    @XmlAttribute(name = "src")
    private String src;
    @XmlAttribute(name = "cardtypename")
    private String cardTypeName;

    public SAccount() {
        cardId = UUID.randomUUID().toString();
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getCardType() {
        return cardType;
    }

    public SAccount setCardType(String cardType) {
        this.cardType = cardType;
        return this;
    }

    public String getCcy() {
        return ccy;
    }

    public SAccount setCcy(String ccy) {
        this.ccy = ccy;
        return this;
    }

    public boolean isAccPayAvail() {
        return accPayAvail;
    }

    public SAccount setAccPayAvail(boolean accPayAvail) {
        this.accPayAvail = accPayAvail;
        return this;
    }

    public boolean isHiddenForStatements() {
        return isHiddenForStatements;
    }

    public SAccount setHiddenForStatements(boolean hiddenForStatements) {
        isHiddenForStatements = hiddenForStatements;
        return this;
    }

    public String getAcc() {
        return acc;
    }

    public SAccount setAcc(String acc) {
        this.acc = acc;
        return this;
    }

    public String getCardState() {
        return cardState;
    }

    public SAccount setCardState(String cardState) {
        this.cardState = cardState;
        return this;
    }

    public boolean isMultiCurrency() {
        return isMultiCurrency;
    }

    public SAccount setMultiCurrency(boolean multiCurrency) {
        isMultiCurrency = multiCurrency;
        return this;
    }

    public boolean isHiddenForPays() {
        return isHiddenForPays;
    }

    public SAccount setHiddenForPays(boolean hiddenForPays) {
        isHiddenForPays = hiddenForPays;
        return this;
    }

    public String getAccType() {
        return accType;
    }

    public SAccount setAccType(String accType) {
        this.accType = accType;
        return this;
    }

    public String getName() {
        return name;
    }

    public SAccount setName(String name) {
        this.name = name;
        return this;
    }

    public String getCard() {
        return card;
    }

    public SAccount setCard(String card) {
        this.card = card;
        return this;
    }

    public String getExpd() {
        return expd;
    }

    public SAccount setExpd(String expd) {
        this.expd = expd;
        return this;
    }

    public String getSrc() {
        return src;
    }

    public SAccount setSrc(String src) {
        this.src = src;
        return this;
    }

    public String getCardTypeName() {
        return cardTypeName;
    }

    public SAccount setCardTypeName(String cardTypeName) {
        this.cardTypeName = cardTypeName;
        return this;
    }
}
